const PI = 3.1415926

const playerDataReader = {
    path: "kubejs/playerData/",
    DefaultPlayerData:
    {
        "money": 0
    },
    readOrCreatePlayerData(name) {
        return global.jsonHelper.readOrCreateFile(this.path + name + ".json", this.DefaultPlayerData)
    },
    readPlayerData(name) {
        return global.jsonHelper.readFile(this.path + name + ".json", this.DefaultPlayerData)
    }
}

function easyReflecter(clazz, obj, name) {
    var field = clazz.__javaObject__.getDeclaredField(name)
    field.setAccessible(true);
    return field.get(obj)
}

function easyReflecterSet(clazz, obj, name, value) {
    var field = clazz.__javaObject__.getDeclaredField(name)
    field.setAccessible(true);
    field.set(obj, value)
}